<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/jsp/commons/taglibs.jsp"%>
<!DOCTYPE html >
<html>
<head>
<jsp:include page="/jsp/commons/cssinclude.jsp"></jsp:include>
<jsp:include page="/jsp/commons/scriptinclude.jsp"></jsp:include>
<meta charset="utf-8">
<title>晶品科技信息管理系统-业务信息</title>
<meta name="keywords" content="">
<meta name="description" content="">

<script type="text/javascript">
	//分页查询
	function queryCategory() {
		<c:choose>
		<c:when test="${pageType eq '1' }">
		var path = "${ctx}/business/businessInfoAction!listOrder.action";
		</c:when>
		<c:when test="${pageType eq '2' }">
		var path = "${ctx}/business/businessInfoAction!listQuote.action";
		</c:when>
		</c:choose>
		query(path);
	}
	
	function queryPage(path, pageindex) {
		pageIndex = pageindex;
		query(path);

	}
	$(document).ready(function() {
		queryCategory();

	});
</script>
</head>
<body>
	 
	<div class="mainbox">
		<div class="main_content"> 
			<div class="main_right">
				<div class="main_rightbox">
					<!--面包屑 begin-->
					<div class="ec_crumb_kc">
						<span><a class="icon_index" href="${ctx}/jsp/commons/right.jsp">返回首页</a></span>当前位置：<a
							style="cursor: pointer; color: #0678BD;" href="${ctx }">首页</a>&nbsp;&gt;&nbsp;
					   
					    <c:choose>
							<c:when test="${pageType eq '1' && projectType eq '0'}">
						        <a style="cursor: pointer; color: #0678BD;" href="${ctx }">业务管理</a>&nbsp;&gt;&nbsp;
						       <em>业务订单 </em>
						    </c:when>
						    <c:when test="${pageType eq '2'  && projectType eq '0'}">
						       <a style="cursor: pointer; color: #0678BD;" href="${ctx }">业务管理</a>&nbsp;&gt;&nbsp;
						       <em>业务报价 </em>
						    </c:when>
						    <c:when test="${pageType eq '1' && projectType eq '1'}">
						        <a style="cursor: pointer; color: #0678BD;" href="${ctx }">商务管理</a>&nbsp;&gt;&nbsp;
						       <em>商务订单 </em>
						    </c:when>
						    <c:when test="${pageType eq '2'  && projectType eq '1'}">
						       <a style="cursor: pointer; color: #0678BD;" href="${ctx }">商务管理</a>&nbsp;&gt;&nbsp;
						       <em>商务报价 </em>
						    </c:when>
						</c:choose>
					    
					</div>
					<!--配置图片 begin-->
					 <div class="service">
					   <!--  <a class="lmImg icon1" href="${ctx}/business/businessInfoAction!addInit.action">新增</a> -->
					</div>
					<!--查询 begin-->
					<div class="user">
						<div class="user_search">
							<form id="businessForm" method="post">
							<div class="frm_cont" id="lmname">
									<label for="lmname">客户名称：</label> 
									<input type="text"
										title="请选择客户名称" id="customerName" onclick="txtCustomerClick()" 
										 name="businessInfoDTO.businessInfo.customerName" />
									 <input type="hidden" id="customerId" value="" name="businessInfoDTO.businessInfo.customerId" />
								</div>
								<div class="frm_cont" id="flm">
									<label for="flm">甲方负责人：</label> <input type="text"  
										title="请输入甲方负责人" id="flm" 
										 name="businessInfoDTO.businessInfo.contactName" />
								</div>
								<c:choose>
								<c:when test="${pageType eq '1' }">
								<div class="frm_cont" id="spfl">
									<label for="spfl">次负责人：</label> 
									<select id="secondHead"
										name="businessInfoDTO.businessInfo.secondHead"
										style="border: 1px solid #DDDDDD; color: #999999;  height: 29px; line-height: 29px; padding-left: 5px; width: 225px;">
										 
										<option value="">---请选择---</option>
										<c:forEach items="${lstUsers }" var="user" >
										<option value="${user.userCode }" >${user.name}</option>
										</c:forEach>
									</select>
								</div>
								</c:when>
								<c:when test="${pageType eq '2' }">
								<div class="frm_cont" id="spfl">
									<label for="spfl">报价单：</label> 
									 <input type="text"  
										title="请输入报价单" id="flm" 
										 name="businessInfoDTO.businessInfo.quotation" />
								</div>
								</c:when>
								</c:choose>
								
								<div class="frm_cont" id="lrfs">
									<label for="lrfs">主负责人：</label> 
									<select id="firstHead"
										name="businessInfoDTO.businessInfo.firstHead"
										style="border: 1px solid #DDDDDD; color: #999999;  height: 29px; line-height: 29px; padding-left: 5px; width: 225px;">
										 
										<option value="">---请选择---</option>
										<c:forEach items="${lstUsers }" var="user" >
										<option value="${user.userCode }" >${user.name}</option>
										</c:forEach>
									</select>
								</div>
							
								 

							</form>
						</div>
						<div class="tbn_search" id="btncenter">
							<a href="javascript:void(0)"
								onclick="queryPage('${ctx}/business/businessInfoAction!listOrder.action',0)">查询</a>
						</div>
						<div class="clear"></div>
					</div>
					<!--表格 & 分页-->
					<div id="Searchresult">
						<table width="100%" border="0" cellspacing="0" cellpadding="0"
							class="tab">
							<tr>
								<th>序号</th>
								<th>日期</th>
								<th>项目名称</th>
								<th>客户名称</th>
								<th>甲方负责人</th>
								<th>联系电话</th>
								<th>主负责人</th>
								<th>次负责人</th>
								<th>临时负责人</th>
								<th>施工进度</th>
								<th>报价单</th>
								<th>验收</th>
								<th>开票</th>
								<th>收款</th>
								<th>操作</th>
							</tr>
							<tr>
								<td colspan="10">正在查询...</td>
							</tr>
						</table>
					</div>

				</div>
			</div>
		</div>
	</div>
 
<!--客户弹出层 begin-->
	<div id="customerDialog" style="display: none">
	</div>
	<!-- JQ -->
	<script type="text/javascript">
	 //加载客户弹出层
    function txtCustomerClick(){
    	 $.post(
	     		 "${ctx}/customer/customerAction!initCustomersDialog.action", 
	 				{random:Math.random()}, 
	 				function(data){
	 					$("#customerDialog").html(data);
						//加载弹出层
	 					art.dialog({
	 					    id: 'msg',
	 					    title: '客户信息',
	 					    content: $("#customerDialog").html(),//绑定内容
	 					    ok: function () {
	 					    	var selectCustomerObj= $("input[name='customerSelected']:checked");
	 					    	 $("#customerName").val($(selectCustomerObj).attr("customerName"));
	 					    	 $("#customerId").val($(selectCustomerObj).attr("customerId"));
	 					    },//确定时回调函数
	 					    cancel:true,//取消时回调函数
	 					    lock: true 
	 					});
	 				}
	      
	        );
    } 
	    
	</script>
</body>
</html>